﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SaleOnlineSystem.Controls
{
    public partial class ViewAll : System.Web.UI.UserControl
    {
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string [] listurl = Request.Url.AbsoluteUri.Split('/');
                string url = listurl[listurl.Length - 1];
           
                if (url == "danhsachsanpham.htm")
                {
                    rpt_ListProduct.DataSource = ListProduct.dt;
                }
                if (url == "boxsanpham.htm")
                {
                    rpt_ListProduct.DataSource = ListBoxProduct.dt;
                }
                if (url == "timkiem.htm")
                {
                    rpt_ListProduct.DataSource = SaleOnlineSystem.ProductSearch.dt;
                }
                if (url == "nhasanxuat.htm")
                {
                    rpt_ListProduct.DataSource = SaleOnlineSystem.VendorSearch.dt;
                }
                rpt_ListProduct.DataBind();
            }
        }
    }
}